package org.example.datascreen.repository;

import org.example.datascreen.eneity.Device;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DeviceRespository extends JpaRepository<Device, Long> {

    @Query("SELECT d.serialNumber FROM Device d WHERE d.category = :category")
    List<String> findSerialNumbersByCategory(String category);
    Device findDeviceByCategory(String category);
    List<Device> findAll();
}
